<?php
	require_once($_SERVER['DOCUMENT_ROOT']."/defaultconf.mex");
	$GrGr[1]['SUM1'] = null;
		$GrGr[1]['SUM2'] = 0;
		$GrGr[1]['SUM3'] = 0;
		$GrGr[1]['CARD'] = 0;
	if (isset($_POST['POOL'])) {
	$ORPOOL = strlen($_POST['POOL']);
	$ORPOOL = substr($_POST['POOL'],0,$ORPOOL-1);
	if ($ORPOOL != '') {
	MYTCONN();
	$GrGr = $GLOBALS['MYT']->db_array("SELECT
						SUM(FraEnviado) SUM1,
						SUM(FraEnviadoUSD) AS SUM2,
						SUM(FraARecibir) AS SUM3,
						COUNT(FraID) AS CARD
					FROM facturas
					WHERE FraID IN ({$ORPOOL})");
	}
	}
	mn_field('text','ED','POOLCUR1','EUR '.number_format($GrGr[1]['SUM1'],2,',',''),'12','12','False','INPCEN" disabled readonly="');
	mn_field('text','ED','POOLCUR2','USD '.number_format($GrGr[1]['SUM2'],2,',',''),'12','12','False','INPCEN" disabled readonly="');
	mn_field('text','ED','POOLCUR3','BRL '.number_format($GrGr[1]['SUM3'],2,',',''),'12','12','False','INPCEN" disabled readonly="');
	mn_field('text','ED','POOLCHK','# '.$GrGr[1]['CARD'],'12','12','False','INPCEN" disabled readonly="');